home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / 3D & Offscreen for MacApp 3 / 3D & Offscreen Sample.sea / 3D & Offscreen Sample / TOffscreenAdorner.h < prev    next >
Text File  |  1993-05-10  |  3KB  |  86 lines

  1. /*************************************************************************
  2.  
  3.         File: TOffscreenAdorner.h
  4.  
  5.         C O P Y R I G H T    N O T I C E
  6.  
  7.      Copyright ⌐ 1993 Eric Hanig.
  8.         All Rights Reserved.
  9.  
  10.  
  11.         D E S C R I P T I O N
  12.         This class, when attached to a view, will create and handle all
  13.         offscreen drawing. It does this by creating a TOffscreenDrawEnvironment
  14.         object and replaces the views current TDrawingEnvironment with
  15.         it. If for any reason offscreen drawing can't take place, then
  16.         normal drawing will occur. If RemoveFromView is called, the old 
  17.         TDrawingEnvironment is replaced and the view acts normally.
  18.         Due to flaws in MacApp 3, this adorner must be manually attached to
  19.         the view.
  20.         
  21.         Classes Defined Here:
  22.  
  23.              Ñ
  24.  
  25.  
  26.         Change History
  27.  
  28.         Rev 1    Tue, Apr 13, 1993 @ 4:59 PM        Hanig
  29.             Creation
  30.  
  31.  *************************************************************************/
  32. /*************************************************************************/
  33. #ifndef __TOffscreenAdorner__
  34. #define __TOffscreenAdorner__
  35.  
  36. /*************************************************************************/
  37. /*                            Include Files                                 */
  38. /*************************************************************************/
  39. #ifndef        __UADORNERS__
  40. #include    "UAdorners.h"
  41. #endif
  42. #ifndef        __TOffscreenDrawEnvironment__
  43. #include    "TOffscreenDrawEnvironment.h"
  44. #endif
  45.  
  46. /*************************************************************************/
  47. /*                                Constants                                     */
  48. /*************************************************************************/
  49.  
  50. /*************************************************************************/
  51. /*                           Class Declaration                             */
  52. /*************************************************************************/
  53.  
  54. class TOffscreenAdorner : public TAdorner
  55. {
  56.     protected:
  57.         TDrawingEnvironment*        fOldDrawingEnvironment;
  58.         TOffscreenDrawEnvironment*    fOffscreenDrawingEnvironment;
  59.         Boolean                        fUseGlobalGWorld;
  60.         
  61.     public:
  62.                                 TOffscreenAdorner(void);
  63.  
  64.         virtual pascal void    AddedToView(TView* itsView);
  65.                         
  66.         virtual pascal void    RemovedFromView(TView* itsView);
  67.                         
  68.         virtual pascal void    ViewChangedFrame (TView* itsView,
  69.                                                     const VRect& oldFrame,
  70.                                                     const VRect& newFrame,
  71.                                                     Boolean    invalidate);
  72.  
  73.         virtual pascal Boolean DoesAdorn (TView* itsView);
  74.                 
  75.         virtual pascal void    Initialize();
  76.         
  77.         virtual pascal void    Free();
  78.         
  79.         virtual pascal void    IOffscreenAdorner(IDType itsID, Boolean freeOnDeletion, Boolean useGlobalGWorld);
  80.  
  81. };
  82.  
  83. /*************************************************************************/
  84. #endif
  85. /*************************************************************************/
  86.